<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ include file="head.jsp" %>
<%@ taglib uri="/WEB-INF/tld/fn.tld" prefix="fn" %>
<%@ taglib uri="/WEB-INF/tld/3codetag.tld" prefix="ct" %>
<%@ taglib uri="/WEB-INF/tld/fmt.tld" prefix="fmt" %>
<%@ taglib uri="/WEB-INF/tld/core.tld" prefix="c" %>
<%@ taglib uri="/struts-tags" prefix="s" %>
<%
	request.getSession(false).removeAttribute("order");
%>
<title>订单信息确认</title>
<style>
<!--
.vyt_bk{display: none;}
.info{display: block; height: 36px; line-height: 36px;}
.info table span:first-child{margin-left:10px;word-wrap:break-word; text-align:left; line-height: 12px;}
.info span:first-child{margin-left:10px; text-align: left;}
-->
</style>
</head>
<body>
	<div class="title">核对信息</div>
	<ul class="radius_border box_form">
		<li><span>应付总价</span><em class="price">
		<fmt:formatNumber value="${(tm['firstItem'].fare+tm['firstItem'].tax+tm['choseLine'].fare+tm['choseLine'].tax)*fn:length(tm['passenger']))}" pattern="￥0" />
		</em></li>
	</ul>
	<ul class="radius_border box_form">
		<li class="li_hr">航班信息
			<s:if test="#session.tm['searchPojo'].voyagetype==2">
				<span style="float: right; width: 200px;"><input type="radio" name="voyagetype" value="1" id="vyt_go" checked="checked"><label for="vyt_go">去程</label>
				<input type="radio" name="voyagetype" value="2" id="vyt_bk"><label for="vyt_bk">返程</label></span>
			</s:if>
		</li>
		<s:if test="#session.tm['searchPojo'].voyagetype==2">
		<div name="info" class="vyt_go">
			<li class="li_hr">
			<ct:code type="city" code="${tm['firstItem'].scity}"/>
			-
			<ct:code type="city" code="${tm['firstItem'].ecity}"/>
			&nbsp;${tm['firstItem'].sdate}
			</li>
			<li><span>航班：</span><ct:code type="air" code="${tm['firstItem'].airLine}"/>&nbsp;${tm['firstItem'].flightno}</li>
			<li><span>机型：</span>${tm['firstItem'].flightType}&nbsp;${tm['searchPojo'].cabin}&nbsp;(${tm['firstItem'].cabin})</li>
			<li><span>起飞：</span>${tm['firstItem'].depTime}</li>
			<li class="li_hr"><span>到达：</span>${tm['firstItem'].arrTime}</li>
			<li>
				<p>折扣价<em class="price"><fmt:formatNumber value="${tm['firstItem'].fare}" pattern="￥0" /></em></p>
				<p>机建燃油<em class="price"><fmt:formatNumber value="${tm['firstItem'].tax}" pattern="￥0" /></em></p>
			</li>
		</div></s:if>
		<div name="info" ${tm['searchPojo'].voyagetype==2?'class="vyt_bk"':'' }>
			<li class="li_hr">
			<ct:code type="city" code="${tm['choseLine'].scity}"/>
			-
			<ct:code type="city" code="${tm['choseLine'].ecity}"/>
			&nbsp;${tm['choseLine'].sdate}
			</li>
			<li><span>航班：</span><ct:code type="air" code="${tm['choseLine'].airLine}"/>&nbsp;${tm['choseLine'].flightno}</li>
			<li><span>机型：</span>${tm['choseLine'].flightType}&nbsp;
			<c:if test="${tm['searchPojo'].cabin==B}">经济舱</c:if>
			<c:if test="${tm['searchPojo'].cabin==Y}">全价舱</c:if>
			<c:if test="${tm['searchPojo'].cabin==C}">公务舱</c:if>
			<c:if test="${tm['searchPojo'].cabin==F}">头等舱</c:if>
			&nbsp;(${tm['choseLine'].cabin})</li>
			<li><span>起飞：</span>${tm['choseLine'].depTime}</li>
			<li class="li_hr"><span>到达：</span>${tm['choseLine'].arrTime}</li>
			<li>
				<p>折扣价<em class="price"><fmt:formatNumber value="${tm['choseLine'].fare}" pattern="￥0" /></em></p>
				<p>机建燃油<em class="price"><fmt:formatNumber value="${tm['choseLine'].tax}" pattern="￥0" /></em></p>
			</li>
		</div>
	</ul>
	<ul class="radius_border box_form">
		<li class="li_hr"><b>登机人信息</b></li>
		<li>共${fn:length(tm['passenger'])}位乘客</li>
		<s:iterator value="#session.tm['passenger']" var="passenger" status="index">
		<li class="info">
			<table cellpadding="3" cellspacing="0">
				<tr>
					<td><span class="span_first">${passenger}</span></td>
					<td><s:if test="cardType==1">身份证</s:if>
					<s:if test="cardType==2">护照</s:if>
					<s:if test="cardType==3">军官证</s:if></td>
					<td>${cardid}</td>		
				</tr>
			</table>
		</li>
		</s:iterator>
	</ul>
	<ul class="radius_border box_form">
		<li class="li_hr"><b>联系人信息</b></li>
		<li class="info">
		<span>${tm['contact'].linkname }</span><span style="width:auto">${tm['contact'].telphone }</span></li>
	</ul>
	<s:if test="#session.tm['travel']!=null">
		<ul class="radius_border box_form">
		<li class="li_hr"><b>报销凭证</b></li>
		<li><span>地址</span>${tm['travel'].province}${tm['travel'].city eq tm['travel'].province?'':tm['travel'].city}${tm['travel'].address}</li>
		<li><span>联系人</span>${tm['travel'].name}</li>
		<li><span>电话</span>${tm['travel'].phone}</li>
		<li><span>邮编</span>${tm['travel'].zip}</li>
	</ul>
	
	</s:if>
	
	<div align="center" style="height: 36px; line-height: 36px;">
		<form action="order_create.shtml" method="post">
			<button class="next_button" type="submit">提交订单</button>
		</form>
	</div><br/>
	<s:if test="#session.tm['searchPojo'].voyagetype==2">
	<script type="text/javascript">
	$("input[name='voyagetype']").click(function(){
		$("div[name='info']").each(function(){$(this).hide();})
		$('.'+$(this).attr('id')).show();
	});
	</script></s:if>
</body>
</html>